<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10.4.流程控制-分支结构-三元表达式</title>
    <script>
        var num = 10;
        var result = num > 5 ? '是' : '不是'; // 表达式是由返回值的
        console.log(result);
        //本质也是同理与if else 简化版的
        if (num < 5) {
            result = '是';
        } else {
            result = '不是';
        }
        console.log(result);
    </script>
</head>

<body>

</body>

</html>